# name: Odoo Method Constrains
# key: odoo_method_constrains
# --
@api.one
@api.constrains('$1', ...)
def _check_field(self):
  if self.field == $2:
  	raise ValidationError('$2')
